package eerbaar.action;

import eerbaar.context.IParams;
import eerbaar.shared.service.ServiceFactory;

public class ActionFactory {

    public static IAction createAction(String name, IParams params) {

        IActionService service = ServiceFactory
                .getService(IActionService.class);
        IAction r = service.createAction(name, params);
        r.setParams(params);
        return r;
    }

    public static void registerAction(String name, IActionFactory controller) {

        IActionService service = ServiceFactory
                .getService(IActionService.class);
        service.registerAction(name, controller);
    }

}
